GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____8888____8888____8888____8888____RRRREEEEVVVV, GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____11110000____11110000____11110000____2222, or
ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss returns pixel data from the frame buffer, starting with the
pixel whose lower left corner is at location (_x, _y), into client memory
starting at location _p_i_x_e_l_s. Several parameters control the processing
of the pixel data before it is placed into client memory. These
parameters are set with three commands: ffffggggllllPPPPiiiixxxxeeeellllSSSSttttoooorrrreeee, ffffggggllllPPPPiiiixxxxeeeellllTTTTrrrraaaannnnssssffffeeeerrrr,
and ffffggggllllPPPPiiiixxxxeeeellllMMMMaaaapppp. This reference page describes the effects on
ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss of most, but not all of the parameters specified by these
Color indices are read from the color buffer selected by
ffffggggllllRRRReeeeaaaaddddBBBBuuuuffffffffeeeerrrr. Each index is converted to fixed point, shifted
left or right depending on the value and sign of
GGGGLLLL____IIIINNNNDDDDEEEEXXXX____SSSSHHHHIIIIFFFFTTTT, and added to GGGGLLLL____IIIINNNNDDDDEEEEXXXX____OOOOFFFFFFFFSSSSEEEETTTT. If GGGGLLLL____MMMMAAAAPPPP____CCCCOOOOLLLLOOOORRRR
is GGGGLLLL____TTTTRRRRUUUUEEEE, indices are replaced by their mappings in the table
Stencil values are read from the stencil buffer. Each index is
converted to fixed point, shifted left or right depending on
the value and sign of GGGGLLLL____IIIINNNNDDDDEEEEXXXX____SSSSHHHHIIIIFFFFTTTT, and added to
GGGGLLLL____IIIINNNNDDDDEEEEXXXX____OOOOFFFFFFFFSSSSEEEETTTT. If GGGGLLLL____MMMMAAAAPPPP____SSSSTTTTEEEENNNNCCCCIIIILLLL is GGGGLLLL____TTTTRRRRUUUUEEEE, indices are
replaced by their mappings in the table GGGGLLLL____PPPPIIIIXXXXEEEELLLL____MMMMAAAAPPPP____SSSS____TTTTOOOO____SSSS.
Processing differs depending on whether color buffers store
color indices or RGBA color components. If color indices are
stored, they are read from the color buffer selected by
ffffggggllllRRRReeeeaaaaddddBBBBuuuuffffffffeeeerrrr. Each index is converted to fixed point, shifted
left or right depending on the value and sign of
GGGGLLLL____IIIINNNNDDDDEEEEXXXX____SSSSHHHHIIIIFFFFTTTT, and added to GGGGLLLL____IIIINNNNDDDDEEEEXXXX____OOOOFFFFFFFFSSSSEEEETTTT. Indices are then
replaced by the red, green, blue, and alpha values obtained by
indexing the tables GGGGLLLL____PPPPIIIIXXXXEEEELLLL____MMMMAAAAPPPP____IIII____TTTTOOOO____RRRR, GGGGLLLL____PPPPIIIIXXXXEEEELLLL____MMMMAAAAPPPP____IIII____TTTTOOOO____GGGG,
GGGGLLLL____PPPPIIIIXXXXEEEELLLL____MMMMAAAAPPPP____IIII____TTTTOOOO____BBBB, and GGGGLLLL____PPPPIIIIXXXXEEEELLLL____MMMMAAAAPPPP____IIII____TTTTOOOO____AAAA. Each table must
n
be of size 2 , but n may be different for different tables.
Before an index is used to look up a value in a table of size
n n
2 , it must be masked against 2 -1.
If RGBA color components are stored in the color buffers, they
are read from the color buffer selected by ffffggggllllRRRReeeeaaaaddddBBBBuuuuffffffffeeeerrrr. Each
color component is converted to floating point such that zero
intensity maps to 0.0 and full intensity maps to 1.0. Each
component is then multiplied by GGGGLLLL____cccc____SSSSCCCCAAAALLLLEEEE and added to
GGGGLLLL____cccc____BBBBIIIIAAAASSSS, where _c is RED, GREEN, BLUE, or ALPHA. Finally, if
GGGGLLLL____MMMMAAAAPPPP____CCCCOOOOLLLLOOOORRRR is GGGGLLLL____TTTTRRRRUUUUEEEE, each component is clamped to the range
[0, 1], scaled to the size of its corresponding table, and is
then replaced by its mapping in the table GGGGLLLL____PPPPIIIIXXXXEEEELLLL____MMMMAAAAPPPP____cccc____TTTTOOOO____cccc,
where _c is R, G, B, or A.
Unneeded data is then discarded. For example, GGGGLLLL____RRRREEEEDDDD discards
the green, blue, and alpha components, while GGGGLLLL____RRRRGGGGBBBB discards
only the alpha component. GGGGLLLL____LLLLUUUUMMMMIIIINNNNAAAANNNNCCCCEEEE computes a single-
component value as the sum of the red, green, and blue
components, and GGGGLLLL____LLLLUUUUMMMMIIIINNNNAAAANNNNCCCCEEEE____AAAALLLLPPPPHHHHAAAA does the same, while keeping
alpha as a second value. The final values are clamped to the
range [0, 1].
The shift, scale, bias, and lookup factors just described are all
specified by
ffffggggllllPPPPiiiixxxxeeeellllTTTTrrrraaaannnnssssffffeeeerrrr. The lookup table contents themselves are specified by
ffffggggllllPPPPiiiixxxxeeeellllMMMMaaaapppp.
Finally, the indices or components are converted to the proper format, as
specified by _t_y_p_e. If _f_o_r_m_a_t is GGGGLLLL____CCCCOOOOLLLLOOOORRRR____IIIINNNNDDDDEEEEXXXX or GGGGLLLL____SSSSTTTTEEEENNNNCCCCIIIILLLL____IIIINNNNDDDDEEEEXXXX and
_t_y_p_e is not GGGGLLLL____FFFFLLLLOOOOAAAATTTT, each index is masked with the mask value given in
the following table. If _t_y_p_e is GGGGLLLL____FFFFLLLLOOOOAAAATTTT, then each integer index is
converted to single-precision floating-point format.
If _f_o_r_m_a_t is GGGGLLLL____RRRREEEEDDDD, GGGGLLLL____GGGGRRRREEEEEEEENNNN, GGGGLLLL____BBBBLLLLUUUUEEEE, GGGGLLLL____AAAALLLLPPPPHHHHAAAA, GGGGLLLL____RRRRGGGGBBBB, GGGGLLLL____BBBBGGGGRRRR,
GGGGLLLL____RRRRGGGGBBBBAAAA, GGGGLLLL____BBBBGGGGRRRRAAAA, GGGGLLLL____AAAABBBBGGGGRRRR____EEEEXXXXTTTT, GGGGLLLL____LLLLUUUUMMMMIIIINNNNAAAANNNNCCCCEEEE, or GGGGLLLL____LLLLUUUUMMMMIIIINNNNAAAANNNNCCCCEEEE____AAAALLLLPPPPHHHHAAAA and
_t_y_p_e is not GGGGLLLL____FFFFLLLLOOOOAAAATTTT, each component is multiplied by the multiplier
shown in the following table. If type is GGGGLLLL____FFFFLLLLOOOOAAAATTTT, then each component
GGGGLLLL____BBBBLLLLUUUUEEEE, GGGGLLLL____AAAALLLLPPPPHHHHAAAA, or GGGGLLLL____LLLLUUUUMMMMIIIINNNNAAAANNNNCCCCEEEE, a single value is returned and the
data for the ith pixel in the jth row is placed in location
(j) width + i. GGGGLLLL____RRRRGGGGBBBB and GGGGLLLL____BBBBGGGGRRRR return three values, GGGGLLLL____RRRRGGGGBBBBAAAA, GGGGLLLL____BBBBGGGGRRRRAAAA
and GGGGLLLL____AAAABBBBGGGGRRRR____EEEEXXXXTTTT return four values, and GGGGLLLL____LLLLUUUUMMMMIIIINNNNAAAANNNNCCCCEEEE____AAAALLLLPPPPHHHHAAAA returns two
values for each pixel, with all values corresponding to a single pixel
occupying contiguous space in _p_i_x_e_l_s. Storage parameters set by
ffffggggllllPPPPiiiixxxxeeeellllSSSSttttoooorrrreeee, such as GGGGLLLL____PPPPAAAACCCCKKKK____LLLLSSSSBBBB____FFFFIIIIRRRRSSSSTTTT and GGGGLLLL____PPPPAAAACCCCKKKK____SSSSWWWWAAAAPPPP____BBBBYYYYTTTTEEEESSSS, affect
the way that data is written into memory. See ffffggggllllPPPPiiiixxxxeeeellllSSSSttttoooorrrreeee for a
description.
Normally ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss is synchronous: OpenGL executes a ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss
command in the order it is issued in the OpenGL command stream. Calling
ffffggggllllEEEEnnnnaaaabbbblllleeee with parameter GGGGLLLL____AAAASSSSYYYYNNNNCCCC____RRRREEEEAAAADDDD____PPPPIIIIXXXXEEEELLLLSSSS____SSSSGGGGIIIIXXXX causes subsequent
ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss commands to be asynchronous as defined by the SSSSGGGGIIIIXXXX____aaaassssyyyynnnncccc
extension. An implementation of the asynchronous ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss command
may be non-blocking: It may return control to the program immediately
rather than waiting for the command's results to be written into the
destination rectangle in host memory. The ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss command samples
the OpenGL state vector at the time it is issued, but it may be executed
at some undefined point in the future. In particular, if subsequent
commands change the contents of the source rectangle in the framebuffer,
then the result of the ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss is undefined.
Calling ffffggggllllDDDDiiiissssaaaabbbblllleeee with parameter GGGGLLLL____AAAASSSSYYYYNNNNCCCC____RRRREEEEAAAADDDD____PPPPIIIIXXXXEEEELLLLSSSS____SSSSGGGGIIIIXXXX restores the
default synchronous behavior for subsequent ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss commands. It
does not affect any pending asynchronous ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss commands, or wait
for their completion.
When an asynchronous ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss command is issued, it is associated
with the current value of GGGGLLLL____AAAASSSSYYYYNNNNCCCC____MMMMAAAARRRRKKKKEEEERRRR____SSSSGGGGIIIIXXXX as defined by the
SSSSGGGGIIIIXXXX____aaaassssyyyynnnncccc extension. A program can determine if an asynchronous
ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss command has completed by using the ffffggggllllFFFFiiiinnnniiiisssshhhhAAAAssssyyyynnnnccccSSSSGGGGIIIIXXXX or
When GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____RRRREEEEAAAADDDD____IIIINNNNGGGGRRRR is enabled, every other row of the source
pixel rectangle is read. The height of the pixel rectangle is equivalent
to 2xheight. Only rows (y+0,y+2,...) are read and affected by the pixel
transfer and store operations.
NNNNOOOOTTTTEEEESSSS
Values for pixels that lie outside the window connected to the current GL
context are undefined.
GGGGLLLL____AAAABBBBGGGGRRRR____EEEEXXXXTTTT is valid only if the EEEEXXXXTTTT____aaaabbbbggggrrrr extension is supported.
If an error is generated, no change is made to the contents of _p_i_x_e_l_s.
EEEERRRRRRRROOOORRRRSSSS
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _f_o_r_m_a_t or _t_y_p_e is not an accepted value.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_y_p_e is GGGGLLLL____BBBBIIIITTTTMMMMAAAAPPPP and _f_o_r_m_a_t is not
GGGGLLLL____CCCCOOOOLLLLOOOORRRR____IIIINNNNDDDDEEEEXXXX or GGGGLLLL____SSSSTTTTEEEENNNNCCCCIIIILLLL____IIIINNNNDDDDEEEEXXXX.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if either _w_i_d_t_h or _h_e_i_g_h_t is negative.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if _f_o_r_m_a_t is GGGGLLLL____CCCCOOOOLLLLOOOORRRR____IIIINNNNDDDDEEEEXXXX and the
color buffers store RGBA color components.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if _f_o_r_m_a_t is GGGGLLLL____SSSSTTTTEEEENNNNCCCCIIIILLLL____IIIINNNNDDDDEEEEXXXX and there
is no stencil buffer.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if _f_o_r_m_a_t is GGGGLLLL____DDDDEEEEPPPPTTTTHHHH____CCCCOOOOMMMMPPPPOOOONNNNEEEENNNNTTTT and
there is no depth buffer.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss is executed between
the execution of ffffggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ffffggggllllEEEEnnnndddd.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if _t_y_p_e is one of
GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____SSSSHHHHOOOORRRRTTTT____5555____6666____5555, or GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____SSSSHHHHOOOORRRRTTTT____5555____6666____5555____RRRREEEEVVVV and _f_o_r_m_a_t is not
GGGGLLLL____RRRRGGGGBBBB.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if _t_y_p_e is one of
GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____11110000____11110000____11110000____2222, or GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____2222____11110000____11110000____11110000____RRRREEEEVVVV and _f_o_r_m_a_t
is not GGGGLLLL____RRRRGGGGBBBBAAAA, GGGGLLLL____BBBBGGGGRRRRAAAA or GGGGLLLL____AAAABBBBGGGGRRRR____EEEEXXXXTTTT.
The formats GGGGLLLL____BBBBGGGGRRRR, and GGGGLLLL____BBBBGGGGRRRRAAAA and types GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____BBBBYYYYTTTTEEEE____3333____3333____2222,
GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____8888____8888____8888____8888____RRRREEEEVVVV, GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____11110000____11110000____11110000____2222, and
GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____2222____11110000____11110000____11110000____RRRREEEEVVVV are available only if the GL version is
1.2 or greater.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated when the SSSSGGGGIIIIXXXX____ssssuuuubbbbssssaaaammmmpppplllleeee extension is
supported, and the pixel storage mode GGGGLLLL____PPPPAAAACCCCKKKK____SSSSUUUUBBBBSSSSAAAAMMMMPPPPLLLLEEEE____RRRRAAAATTTTEEEE____SSSSGGGGIIIIXXXX is not
GGGGLLLL____PPPPIIIIXXXXEEEELLLL____SSSSUUUUBBBBSSSSAAAAMMMMPPPPLLLLEEEE____4444444444444444____SSSSGGGGIIIIXXXX, and _w_i_d_t_h is not a multiple of 2, or _f_o_r_m_a_t
is not a 3 or 4 component format, or _t_y_p_e is a packed pixels type.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if GGGGLLLL____AAAASSSSYYYYNNNNCCCC____RRRREEEEAAAADDDD____PPPPIIIIXXXXEEEELLLLSSSS____SSSSGGGGIIIIXXXX is enabled
and the number of asynchronous ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss commands that have been
issued but not queried (using ffffggggllllFFFFiiiinnnniiiisssshhhhAAAAssssyyyynnnnccccSSSSGGGGIIIIXXXX or ffffggggllllPPPPoooollllllllAAAAssssyyyynnnnccccSSSSGGGGIIIIXXXX)
The SSSSGGGGIIIIXXXX____aaaassssyyyynnnncccc and SSSSGGGGIIIIXXXX____aaaassssyyyynnnncccc____ppppiiiixxxxeeeellll extensions are implemented only on
Octane2 VPro systems.
RealityEngine, RealityEngine2, and VTX systems do not support convolving
images as they are read from the framebuffer.
The SSSSGGGGIIIIXXXX____yyyyccccrrrrccccbbbb extension is supported only on O2 systems. When using
GGGGLLLL____YYYYCCCCRRRRCCCCBBBB____444422222222____SSSSGGGGIIIIXXXX with ffffggggllllRRRReeeeaaaaddddPPPPiiiixxxxeeeellllssss on O2 systems, an odd integer value
for GGGGLLLL____PPPPAAAACCCCKKKK____SSSSKKKKIIIIPPPP____PPPPIIIIXXXXEEEELLLLSSSS will be set to the next highest even integer
value to preserve color alignment.
On Octane2 VPro systems the format GGGGLLLL____DDDDEEEEPPPPTTTTHHHH____CCCCOOOOMMMMPPPPOOOONNNNEEEENNNNTTTT22224444____SSSSGGGGIIIIXXXX can be used
to transfer depth pixel values to and from the depth buffer in their
internal eye-space range. There are performance advantages over
transfers that convert to screen-space values, particularly for
GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT type pixels.
On RealityEngine, RealityEngine2, and VTX systems, histogramming and
minmax never sink pixel data that is being read from the framebuffer.
The IIIINNNNGGGGRRRR____iiiinnnntttteeeerrrrllllaaaacccceeee____rrrreeeeaaaadddd extension is supported only on Octane2 VPro
systems, and on O2 systems.
The EEEEXXXXTTTT____ppppaaaacccckkkkeeeedddd____ppppiiiixxxxeeeellllssss extension is not supported on RealityEngine,
The following problems are known to exist on RealityEngine,
RealityEngine2, and VTX systems:
1. It is not possible to read the depth or stencil buffers of
multisample-capable Visuals.
2. Reading the depth-buffer is much slower than reading a color-
buffer.
3. Reading RGBA format data from a color-index window does not work
correctly.
The SSSSGGGGIIIIXXXX____ssssuuuubbbbssssaaaammmmpppplllleeee and SSSSGGGGIIIIXXXX____rrrreeeessssaaaammmmpppplllleeee extensions are supported only on
Octane2 VPro systems. Applying the GGGGLLLL____PPPPIIIIXXXXEEEELLLL____SSSSUUUUBBBBSSSSAAAAMMMMPPPPLLLLEEEE____2222444422224444____SSSSGGGGIIIIXXXX
subsample rate is accelerated for direct immmediate mode transfers when
the format is GGGGLLLL____RRRRGGGGBBBB or GGGGLLLL____RRRRGGGGBBBBAAAA, and the type is GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____BBBBYYYYTTTTEEEE or